A wide-angle or “fish-eye” lens allows capture of a greater field of view than a normal lens (which does not expand or contract the field of view) but at the expense of some distortion in the captured image. This distortion, known alternatively as radial, barrel, or fish-eye distortion, causes the magnification of the image to decrease as the distance from the center of the image increases. Thus, a point near the center of the image may have little or no distortion while a point at the edge of the image may have significant distortion. While the distortion is undesirable, a wide-angle lens may be useful in applications requiring more visual information (i.e., a wider visual field of view) than a normal lens is capable of capturing. Other types of lenses may similarly be useful in different applications, but may similarly introduce distortion into an image.
Wide-angle lenses may therefore be used in applications such as vehicle-mounted proximity-detection systems and security cameras. These applications often must rapidly analyze an incoming stream of captured images for particular shapes or objects. Correct identification of these objects often requires correction of minute aberrations or distortions in the images captured by the wide-angle lens.
The image correction involves converting the original, hemispherical image (or “source image”) presented by the wide-angle lens into a rectilinear image (or “destination image”) using a mapping process. Several steps may be required in this process, including (i) analyzing the physical characteristics of the lens to calibrate the amount of distortion introduced thereby; (ii) selecting a set of pixels from the source image, based on the results of the calibration, to fill a corresponding pixel location in the destination image; and (iii) smoothening/interpolating between the selected set of pixels.
The above process is typically performed by a digital-signal processor having only a limited amount of on-chip memory. Thus, a larger, external memory may be needed to hold large images captured by the wide-angle lens. The access time of this external memory is often much slower than the smaller on-chip memory. Existing methods cache data locally (i.e., on-chip) to circumvent the slow access of external memory by, for example, dividing the large external memory into pages and mapping the pages to cached sections of on-chip memory. Because the memory-access pattern involved in the distortion correction is random, however, it results in cache misses that increase the overall processing time. Another approach brings the required set of source image pixels from the slower off-chip memory to the faster on-chip memory for processing using, e.g., a data memory access engine. For each pixel, however, the setup time of this engine is huge compared to the processing time. These generic solutions are not well-suited to the particular challenges of using commonly available hardware to correct image distortion. Thus, a need exists for quickly and efficiently correcting distortion in a wide-angle image given the limitations of digital-signal processors.